Formal equivalence checking